﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KnBinarySerializer.Tests.Ent
{
    internal class SideBySide
    {

        public void Build(List<string> arr, int max)
        {
            max--;
            if (max == 0)
                return;
            ItemBuilder item = new ItemBuilder(max);
            arr.Add(item.GetResult());
            //item.GetResult();
            Build(arr, max);
        }
    }

    public class ItemBuilder
    {
        private string[] arrayString;
        //private string lastGuid;
        public ItemBuilder(int cnt)
        {
            arrayString = new string[cnt];
            //this.lastGuid = "";
        }

        public string GetResult()
        {
            string lastGuid = "";
            for (int i = 0; i < arrayString.Length; i++)
            {
                arrayString[i] = Guid.NewGuid().ToString();
                lastGuid = arrayString[i];
            }
            return lastGuid;
        }
    }
}
